const authMap = {
  0: '未认证',
  1: '待审核',
  2: '已认证',
  3: '认证失败'
}
const getters = {
  userName: state => state.app.userName,
  userInfo: state => state.user.userInfo,
  isAuth: state => state.user.userInfo.authStatus == 2, // 身份证是否已认证
  isAuthText: state => authMap[state.user.userInfo.authStatus] || '未认证',
  WxInfo: state => state.user.WxInfo,
  token: state => state.user.token,
  cardTypeList: state => state.user.cardTypeList,
  cardTypeMap: state => {
    let _map = {}
    state.user.cardTypeList.forEach(v => _map[v.value] = v.text)
    return _map
  }
}
export default getters
